package com.showsu.editor.entity.platform.xhs;

import lombok.Data;

import java.io.Serializable;
import java.util.List;

/**
 * @Author: William
 * @Description:
 * @Date: Created in 8:34 下午 2023/6/19
 * @Modified By:
 */
@Data
public class AwemeDetailPlatformResult implements Serializable {

    private Integer code;
    private Integer status_code;
    private Boolean success;
    private List<AwemeDetail> data;
    private String msg;
    private String _msg;

    @Data
    public class AwemeDetail implements Serializable {
        private String track_id;
        private String model_type;
        private User user;
        private List<Note> note_list;

        @Data
        public class User implements Serializable {
            private String image;
            private String name;
            /**
             * 达人昵称
             */
            private String nickname;
            private Integer red_official_verify_type;
            private String id;
            private Boolean followed;
            private String userid;
            private String red_id;
        }

        @Data
        public class Note implements Serializable {
            private Boolean enable_fls_bridge_cards;
            /**
             * 点赞量
             */
            private Integer liked_count;
            private Boolean collected;
            private ShareInfo share_info;
            /**
             * 标题
             */
            private String title;
            /**
             * 发布时间，10位时间戳
             */
            private Long time;
            /**
             * 最近更新时间，10位时间戳
             */
            private Long last_update_time;
            /**
             * 笔记类型，video-视频、normal-图文
             */
            private String type;
            /**
             * 该字段不为空，则代表是带货笔记
             */
            private String goodsId;
            /**
             * 收藏量
             */
            private Integer collected_count;
            /**
             * 评论量
             */
            private Integer comments_count;
            /**
             * 分享量
             */
            private Integer shared_count;

            private String desc;

            private String widgets_context;

            private List<Image> images_list;

            private String text;

            private List<HashTagDTO> hash_tag;

            @Data
            public class HashTagDTO {
                private String id;
                private String name;
            }

            @Data
            public class ShareInfo implements Serializable {
                /**
                 *  封面图
                 */
                private String image;
                private String link;
                private Boolean is_star;
                private String title;
                private Boolean guide_audited;
                private String content;
                private List<FunctionEntry> function_entries;

                @Data
                public class FunctionEntry implements Serializable {
                    private String type;
                    private String link;

                }
            }

            @Data
            public class Image implements Serializable {
                private String fileid;
                private Integer height;
                private Integer width;
                private String url;
                private String url_size_large;
                private String original;
                private UrlMultiLevel url_multi_level;
                private String trace_id;
                private String live_photo_file_id;
                private LivePhoto live_photo;
                private LivePhoto.Media.Stream stream;
                private Boolean need_load_original_image;
                private Double scale_to_large;

                @Data
                private class UrlMultiLevel implements Serializable {
                    private String low;
                    private String medium;
                    private String high;
                }

                @Data
                public class LivePhoto implements Serializable {
                    private Media media;

                    @Data
                    public class Media implements Serializable {
                        private Stream stream;
                        private Integer user_level;
                        private String video_id;

                        @Data
                        public class Stream implements Serializable {
                            private List<H264> h264;
                            private List<H264> h265;

                            @Data
                            public class H264 implements Serializable {
                                private String master_url;
                                private String masterUrl;
                            }
                        }

                    }
                }
            }
        }
    }
}
